<%-- 
    Document   : listaCargos
    Created on : 06/07/2011, 18:06:08
    Author     : Gabriella
--%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@taglib prefix="f" uri="http://java.sun.com/jsf/core"%>
<%@taglib prefix="h" uri="http://java.sun.com/jsf/html"%>

<f:view>
    <html>
        <head>
            <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
            <title><h:outputText value="#{msgs.titulolistarcargo}"/></title>
        </head>
        <body>
            <h:form>
                <h:dataTable value="#{cargoManaged.listaDeCargos}" var="cargo" border="1" cellpadding="2" cellspacing="0">
                    <f:facet name="header">
                        <h:outputText value="Lista de Cargos" />
                    </f:facet>

                    <h:column>
                        <f:facet name="header">
                            <h:outputText value="Nome"/>
                        </f:facet>
                        <h:outputText value="#{cargo.nome}"/>
                    </h:column>
                    <h:column>
                        <f:facet name="header">
                            <h:outputText value="Classe"/>
                        </f:facet>
                        <h:outputText value="#{cargo.classe}"/>
                    </h:column>

                    <h:column>
                        <f:facet name="header">
                            <h:outputText value="Excluir"/>
                        </f:facet>
                        <h:commandLink action="#{cargoManaged.remover}" value="excluir"/>
                    </h:column>
                    <h:column>
                        <f:facet name="header">
                            <h:outputText value="Editar"/>
                        </f:facet>
                        <h:commandLink action="#{cargoManaged.editarCargo}" value="editar"/>                         
                    </h:column>                     
                </h:dataTable><br/><br/>
                 <h:commandLink action="home" value="voltar"/>
            </h:form>
        </body>
    </html>
</f:view>